]> dgit.raspbian.org Git - gnome-shell.git/commit
slider: Add mark snapping support
authorrevisto <therevisto@gmail.com>
Mon, 22 Dec 2025 21:32:32 +0000 (01:02 +0330)
committerMarge Bot <marge-bot@gnome.org>
Tue, 3 Feb 2026 13:11:37 +0000 (13:11 +0000)
commit79bfe68df34a02cb2ef1919ba352ae2f38c0dcd3
tree24222e690f3025bd6ffc4231b5d5a0f05c31554f
parent96ab95a675b94700886056361e95488bd8c91c01
slider: Add mark snapping support

Add API to add and clear marks, similar to GtkScale. The
slider value will snap to a mark when close to it, making
it easy for the user to position the slider exactly at
the mark's value.

The unsnapped value is still tracked internally, to allow
escaping snap zones when the scroll step is smaller than
the snap threshold.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/4004>
js/ui/slider.js